﻿using System;
using System.Text;
using System.Web;

namespace Alex.Library.Web.Ajax
{
    /// <summary>
    /// Ajax请求处理类
    /// </summary>
    public class WAjaxHttpHandler : IHttpHandler
    {
        /// <summary>
        /// 处理请求
        /// </summary>
        /// <param name="context">Http上下文</param>
        public void ProcessRequest(HttpContext context)
        {
            WAjaxInvoker invoker = new WAjaxInvoker(context);
            invoker.Invoke(true, true, "utf-8", Encoding.UTF8);
            context.Response.End();
        }

        /// <summary>
        /// 指示是否可以重用
        /// </summary>
        public bool IsReusable
        {
            get { return false; }
        }
    }
}
